#import "TTotheAppUserModel.h"


@implementation TTotheAppUserModel {
    NSArray <NSString *>*_heiyouTypeImages;
}

+ (instancetype)fyanouLoginUser {
    TTotheAppUserModel *habibi = [TTotheAppUserModel new];
    [habibi loadCache];
    return habibi;
}

- (NSArray<NSString *> *)heiyouTypeImages {
    if (!_heiyouTypeImages) {
        NSMutableArray <NSString *> *kelinaApp = [NSMutableArray array];
        if (self.miyouUserAuthRunner.flagmePersonAuthBlick==2) {
            [kelinaApp addObject:@"home/zrauth"];
        }
        
        if (self.miyouUserAuthRunner.hayunAppearanceAuthBlick==2 && self.miyouUserAuthRunner.hajiuSuperPrettyAuthYellow==2) {
            [kelinaApp addObject:@"home/high_auth"];
        }
        
        if (self.jiumiUserAccountHotown.feshuVipLevelReder>=2) {
            
            [kelinaApp addObject:[NSString stringWithFormat:@"home/vip%ld", (long)self.jiumiUserAccountHotown.feshuVipLevelReder]];
        }
        _heiyouTypeImages = kelinaApp.copy;
    }
    return _heiyouTypeImages;
}

- (BOOL)fyanouCanUseChatup {
    // 1.如果我是女生&普通账号&需要真人认证
    // 2.如果我是女生&普通账号&需要实名认证&后台配置
    // 3.如果我是女生&还未设置搭讪
//    if (self.hayunUserHotown.feshuSexRunner == 2 && self.hayunUserHotown.hajiuTypeBlick == 1 && self.miyouUserAuthRunner.flagmePersonAuthBlick != 2) {
//
//        [YOUfanUserAuthTipView jiucunPopUserAuthTipWithFeiwuType:@"真人"];
//
//        return NO;
//    }
//
//    if (self.hayunUserHotown.feshuSexRunner == 2 && self.hayunUserHotown.hajiuTypeBlick == 1 && self.miyouUserAuthRunner.hayunRpAuthPink != 2 && [YOUfanUserFunConfig fyanouAppConfig].stickRpAuthCheckSwitch.intValue) {
//        [YOUfanUserAuthTipView jiucunPopUserAuthTipWithFeiwuType:@"实名"];
//
//        return NO;
//    }
//
//    if (self.hayunUserHotown.feshuSexRunner == 2 && self.pochuUserDataBlue.fanyouHasImPhraseMango != 1 ) {
//
//        [YOUfanNormalTipView jiucunPopNormalTipWithFeiwuTitle:@"完善搭讪设置，可以提高搭讪的成功率哦～" heiyouBlock:^{
//            dispatch_async(dispatch_get_main_queue(), ^{
//                [kYOUFanCurrentPage().navigationController pushViewController:[YOUfanChatupSetupController new] animated:YES];
//            });
//        }];
//        return NO;
//    }
    
    return YES;
}




+ (NSDictionary *)modelCustomPropertyMapper {
    return @{
        @"feshuAcceptCallPercentRunman" : @"acceptCallPercent",
        @"flagmeAccessTokenRunman" : @"accessToken",
        @"hajiuCheckingIconTipOrange" : @"checkingIconTip",
        @"feshuDiceRemainPink" : @"diceRemain",
        @"feshuExpiredTimestampPink" : @"expiredTimestamp",
        @"flagmeHasImPhraseBlick" : @"hasImPhrase",
        @"miyouJgPushUserTagsBlick" : @"jgPushUserTags",
        @"miyouLargeRechargeSettingHotown" : @"largeRechargeSetting",
        @"feshuLargeRechargeTxtHotown" : @"largeRechargeTxt",
        @"hajiuLikeRemainBlick" : @"likeRemain",
        @"pyyouMobileYellow" : @"mobile",
        @"jiumiRefreshTokenOrange" : @"refreshToken",
        @"jiumiSupermanListBlue" : @"supermanList",
        @"hayunUserHotown" : @"user",
        @"jiumiUserAccountHotown" : @"userAccount",
        @"miyouUserAuthRunner" : @"userAuth",
        @"pochuUserCallDurationBlick" : @"userCallDuration",
        @"feshuUserChargeRunman" : @"userCharge",
        @"hayunUserCityListHotown" : @"userCityList",
        @"pochuUserDataBlue" : @"userData",
        @"jiumiUserFirstDataYellow" : @"userFirstData",
        @"miyouUserIconListYellow" : @"userIconList",
        @"whishowUserLifeListHotown" : @"userLifeList",
        @"feshuUserPrivacyOrange" : @"userPrivacy",
        @"miyouUserThirdPlatformYellow" : @"userThirdPlatform"
    };
};


+ (NSDictionary *)modelContainerPropertyGenericClass {
    return @{@"hayunUserHotown" : [TTotheAppUser class],
             @"jiumiUserAccountHotown":[TTotheAppUserAccount class],
             @"miyouUserAuthRunner":[TTotheAppUserAuth class],
             @"feshuUserChargeRunman":[TTotheAppUserCharge class],
             @"pochuUserDataBlue":[TTotheAppUserData class],
             @"jiumiUserFirstDataYellow":[TTotheAppUserFirstData class],
             @"miyouUserIconListYellow":[TTotheAppUserIconList class],
             @"whishowUserLifeListHotown":[TTotheAppUserLifeList class],
             @"feshuUserPrivacyOrange":[TTotheAppUserPrivacy class],
             @"miyouUserThirdPlatformYellow":[TTotheAppUserThirdPlatform class],
             @"hayunUserCityListHotown":[TTotheAppUserCityList class]};
}

NSString * kTTotheMyUserId(void) {
    return TTotheAppUserModel.fyanouLoginUser.hayunUserHotown.miyouIdFieldHotown;
}

NSString * kTTotheMyUserIcon(void) {
    return TTotheAppUserModel.fyanouLoginUser.hayunUserHotown.hayunIconOrange;
}

- (BOOL)ttathe_isCompleteUserInfo {
    if (self.hayunUserHotown.pochuWeightHotown <= 0 && self.hayunUserHotown.feshuHeightBlick <= 0 && self.hayunUserHotown.flagmeJobBlue.length<=0 && self.hayunUserHotown.hajiuSignatureHotown.length<=0 && self.hayunUserHotown.pyyouMyTagOrange.length<=0 && self.hayunUserHotown.pochuGenderTagRunner.length<=0) {
        return NO;
    }
    return YES;
}

@end
